#ifndef USERMANAGERAPI_H
#define USERMANAGERAPI_H

#include <QObject>
#include <QMainWindow>
#include <QtNetwork>
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <Utils.h>
#include <config.h>
class UserManagerApi : public QObject
{
    Q_OBJECT
public:
    explicit UserManagerApi(QObject *parent = nullptr);

    //查询状态字典
    QNetworkReply* sys_normal_disable();
    //查询性别
    QNetworkReply* sys_user_sex();

    //部门树
    QNetworkReply* deptTree();
    //查初始密码
    QNetworkReply* initPassword();
    //查询用户列表
    QNetworkReply* list(int pageNum,int pageSize,int deptId=0,QString userName="",
        QString phonenumber="",QString status="",QString beginTime="",QString endTime="");
    //改变状态
    QNetworkReply* changeStatus(int userId,QString status);
    //批量删除用户
    QNetworkReply* deleteUserByIds(QString userIds);
    //查岗位和角色列表
    QNetworkReply* getPostAndRole();
    //重置密码
    QNetworkReply* resetPwd(QString pwd,QString userId);
    //查询分配角色授权信息
    QNetworkReply* authRoleInfo(QString userId);
    //授权用户角色
    QNetworkReply* authRole(QString userId,QString roleIds);

private:
    QString baseUrl ;
    QNetworkRequest request;
    QNetworkAccessManager *manager ;

signals:

};

#endif // USERMANAGERAPI_H
